#include "trap.h"
#include "inst_test.h"
    .set noat
    .globl main 
    .text

main:
    addi $s0, $zero, 0x01        # $16 = 0x1
    addi $at, $zero, 0x1e   # $1 = 0xffff    
    addi $v0, $zero, 0x01     # $2 = 0x1
    addi $t1, $zero, 0x00       # $9 = 0x0

BEFORE:
    beq $at, $v0, TARGET    # when $1 = $2,to TARGET
    addi $t1, $t1, 0x1      # 计数器t1自增1 - > 0xfffe
    sub $at, $at, $s0      # at自减1
    addi  $t2, $at, 0x0
    addi $t3, $at, 0x0
    jal BEFORE

TARGET:
    HIT_GOOD_TRAP   